package model;

/**
 * Contact class allows to handle contact's information.
 *
 * @author Sacha MASSON
 */
public class Contact {

    public String image;

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    /**
     * Name of the contact
     */
    public String name;

    /**
     * First name of the contact
     */
    public String firstName;

    /**
     * Home address of the contact
     */
    public String homeAddress;

    /**
     * Personnal phone of the contact
     */
    public String personalPhone;

    /**
     * Group of the contact
     */
    public int group;
    /**
     * Professionnal phone of the contact
     */
    public String professionalPhone;

    /**
     * Home page of the contact
     */
    public String homePage;

    /**
     * Email of the contact
     */
    public String email;

    /**
     * Other infos of the contact
     */
    public String other;

    public int getGroup() {
        return group;
    }

    public void setGroup(int group) {
        this.group = group;
    }

    @Override
    public String toString() {
        return "Fiche de " + this.name + " " + this.firstName;
    }

    /**
     * Constructor with all properties
     *
     * @param name
     * @param firstName
     * @param homeAddress
     * @param personalPhone
     * @param professionalPhone
     * @param homePage
     * @param email
     * @param other
     */
    public Contact(String name, String firstName, String homeAddress, String personalPhone, String professionalPhone, String homePage, String email, String other, String image, int g) {
        this.name = name;
        this.firstName = firstName;
        this.homeAddress = homeAddress;
        this.personalPhone = personalPhone;
        this.professionalPhone = professionalPhone;
        this.homePage = homePage;
        this.email = email;
        this.other = other;
        this.image = image;
        this.group = g;
    }

    /**
     * Allows to edit the contact with the following informations
     *
     * @param name
     * @param firstName
     * @param homeAddress
     * @param personalPhone
     * @param professionalPhone
     * @param homePage
     * @param email
     * @param other
     */
    public void editContact(String name, String firstName, String homeAddress, String personalPhone, String professionalPhone, String homePage, String email, String other, int g) {
        this.name = name;
        this.firstName = firstName;
        this.homeAddress = homeAddress;
        this.personalPhone = personalPhone;
        this.professionalPhone = professionalPhone;
        this.homePage = homePage;
        this.email = email;
        this.other = other;
        this.group = g;
    }

    public void editPicture(String image) {
        this.image = image;
    }

    /**
     *
     * @return
     */
    public String getEmail() {
        return email;
    }

    /**
     *
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     *
     * @return
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     *
     * @param firstName
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     *
     * @return
     */
    public String getHomeAddress() {
        return homeAddress;
    }

    /**
     *
     * @param homeAddress
     */
    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    /**
     *
     * @return
     */
    public String getHomePage() {
        return homePage;
    }

    /**
     *
     * @param homePage
     */
    public void setHomePage(String homePage) {
        this.homePage = homePage;
    }

    /**
     *
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     *
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     *
     * @return
     */
    public String getOther() {
        return other;
    }

    /**
     *
     * @param other
     */
    public void setOther(String other) {
        this.other = other;
    }

    /**
     *
     * @return
     */
    public String getPersonalPhone() {
        return personalPhone;
    }

    /**
     *
     * @param personalPhone
     */
    public void setPersonalPhone(String personalPhone) {
        this.personalPhone = personalPhone;
    }

    /**
     *
     * @return
     */
    public String getProfessionalPhone() {
        return professionalPhone;
    }

    /**
     *
     * @param professionalPhone
     */
    public void setProfessionalPhone(String professionalPhone) {
        this.professionalPhone = professionalPhone;
    }

}
